package com.itwill.ecom.boardType;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.itwill.ecom.board.BoardBeans;

public class BoardTypeDao {
	public final static String namespace="com.itwill.ecom.boardType.BoardTypeMapper";
	private SqlSession session;
	
	public SqlSession getSession(){
		return session;
	}
	public void setSession(SqlSession session){
		System.out.println("### BoardTypeDao() : setSession()");
		this.session=session;
	}

	public BoardTypeDao(){
		System.out.println("### BoardTypeDao() : 디폴트생성자 호출");
	}
	
	public int create(BoardTypeBeans boardTypebeans){
		return session.insert(namespace + ".create", boardTypebeans); 
	}
	
	public int update(BoardTypeBeans boardTypebeans){
		return session.update(namespace + ".update", boardTypebeans); 
	}
	
	public int delete(int btype_no){
		return session.delete(namespace + ".delete", btype_no); 
	}

	public List<BoardTypeBeans> selectAllList(){
		return session.selectList(namespace + ".allList");
	}

	public BoardTypeBeans getBoardTypeBeans(int boardtype_no){
		return session.selectOne(namespace + ".getboardtype", boardtype_no);
	}
	
}







